package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName user
 */
@TableName(value ="user")
public class User {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Login name
     */
    @TableField(value = "username")
    private String username;

    /**
     * Password
     */
    @TableField(value = "password")
    private String password;

    /**
     * Real name
     */
    @TableField(value = "real_name")
    private String realName;

    /**
     * user type
     */
    @TableField(value = "user_type")
    private Integer userType;

    /**
     * Doctor title ID
     */
    @TableField(value = "title_id")
    private Integer titleId;

    /**
     * Participate in schedule (Y/N)
     */
    @TableField(value = "is_schedule")
    private String isSchedule;

    /**
     * Department ID
     */
    @TableField(value = "department_id")
    private Integer departmentId;

    /**
     * Registration level ID
     */
    @TableField(value = "registration_level_id")
    private Integer registrationLevelId;

    /**
     * Delete flag
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Login name
     */
    public String getUsername() {
        return username;
    }

    /**
     * Login name
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Password
     */
    public String getPassword() {
        return password;
    }

    /**
     * Password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * Real name
     */
    public String getRealName() {
        return realName;
    }

    /**
     * Real name
     */
    public void setRealName(String realName) {
        this.realName = realName;
    }

    /**
     * user type
     */
    public Integer getUserType() {
        return userType;
    }

    /**
     * user type
     */
    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    /**
     * Doctor title ID
     */
    public Integer getTitleId() {
        return titleId;
    }

    /**
     * Doctor title ID
     */
    public void setTitleId(Integer titleId) {
        this.titleId = titleId;
    }

    /**
     * Participate in schedule (Y/N)
     */
    public String getIsSchedule() {
        return isSchedule;
    }

    /**
     * Participate in schedule (Y/N)
     */
    public void setIsSchedule(String isSchedule) {
        this.isSchedule = isSchedule;
    }

    /**
     * Department ID
     */
    public Integer getDepartmentId() {
        return departmentId;
    }

    /**
     * Department ID
     */
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * Registration level ID
     */
    public Integer getRegistrationLevelId() {
        return registrationLevelId;
    }

    /**
     * Registration level ID
     */
    public void setRegistrationLevelId(Integer registrationLevelId) {
        this.registrationLevelId = registrationLevelId;
    }

    /**
     * Delete flag
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * Delete flag
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        User other = (User) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getRealName() == null ? other.getRealName() == null : this.getRealName().equals(other.getRealName()))
            && (this.getUserType() == null ? other.getUserType() == null : this.getUserType().equals(other.getUserType()))
            && (this.getTitleId() == null ? other.getTitleId() == null : this.getTitleId().equals(other.getTitleId()))
            && (this.getIsSchedule() == null ? other.getIsSchedule() == null : this.getIsSchedule().equals(other.getIsSchedule()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getRegistrationLevelId() == null ? other.getRegistrationLevelId() == null : this.getRegistrationLevelId().equals(other.getRegistrationLevelId()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getRealName() == null) ? 0 : getRealName().hashCode());
        result = prime * result + ((getUserType() == null) ? 0 : getUserType().hashCode());
        result = prime * result + ((getTitleId() == null) ? 0 : getTitleId().hashCode());
        result = prime * result + ((getIsSchedule() == null) ? 0 : getIsSchedule().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getRegistrationLevelId() == null) ? 0 : getRegistrationLevelId().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", password=").append(password);
        sb.append(", realName=").append(realName);
        sb.append(", userType=").append(userType);
        sb.append(", titleId=").append(titleId);
        sb.append(", isSchedule=").append(isSchedule);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", registrationLevelId=").append(registrationLevelId);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append("]");
        return sb.toString();
    }
}